<ul class="mainImg">
    <?php
    $args = array (
        'posts_per_page'=>12,
        'post_type'=>'post',
        'taxonomy'=>'category',
        'orderby'=>'menu_order date'
    );
    // The Query
    $the_query = new WP_Query( $args );
    while ( $the_query->have_posts() ) : $the_query->the_post();  	
        echo '<li>';
        echo '<a class="fade-image" href="'.get_permalink().'" >';
        
        if ( function_exists('has_post_thumbnail') && has_post_thumbnail()){
             $thumb_id = get_post_thumbnail_id( $post->ID );
             $image_thumbnail = wp_get_attachment_image_src( $thumb_id,'full' ); 
            echo '<img class="fade-image-a" width="256" height="182" alt="" src="';
            echo   get_bloginfo('template_url').'/lib/functions/timthumb/timthumb.php?src='.$image_thumbnail[0].'&w=256&h=182"/>';
            }
            
            if ( (class_exists('MultiPostThumbnails')) && MultiPostThumbnails::has_post_thumbnail('post', 'second-featured-image')) {
            $image_thumbnail2 = MultiPostThumbnails::get_the_post_thumbnail_link('post', 'second-featured-image');
                
            echo '<img class="fade-image-b" width="256" height="182" alt="" src="';
            echo   get_bloginfo('template_url').'/lib/functions/timthumb/timthumb.php?src='.$image_thumbnail2.'&w=256&h=182"/>';
            }
        echo '</a>'; 
        echo '</li>';
    endwhile; 
    // Reset Post Data
    wp_reset_postdata();  
    ?>
    </ul>